# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=pingus
pkgver=0.7.6
pkgrel=7
pkgdesc="Free Lemmings(TM) clone"
url="https://pingus.seul.org/"
arch="all"
license="GPL-2.0-only"
depends="$pkgname-data libmikmod"
makedepends="freeglut-dev sdl12-compat-dev sdl_image-dev sdl_mixer-dev libpng-dev boost-dev scons"
options="!check"  # No testsuite
source="https://gitlab.com/pingus/downloads/-/raw/master/pingus-$pkgver.tar.bz2
	00-fix-python-typos.patch
	01-pingus-1.76-boost-1.69.patch
	02-missing-header.patch
	03-pingus-0.7.6-gcc470-udl.patch
	pingus.desktop
	"
subpackages="$pkgname-doc $pkgname-data::noarch"

build() {
	scons prefix=/usr DESTDIR="$pkgdir"
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" install
	install -Dm644 "$srcdir"/pingus.desktop \
	"$pkgdir"/usr/share/applications/pingus.desktop
}

data() {
	pkgdesc="$pkgdesc (data files)"
	amove /usr/share/pingus
}

sha512sums="6c8c2ace1a9229b4e3b506aee76aa94c0dd906a64fa2c817902c2cd3854df390cf675c8c6ddd3ba1926a467348b2103818bd44bc095378cc7bf3f2ff7af27188  pingus-0.7.6.tar.bz2
674620c2b56df129f297a41bb4fc61af18063a17a9cd3022418cfa28b12f422a37db3e04b04d2a28f450a3250ac6a7dc58fe44fefda60577a0af6cb5b0c10739  00-fix-python-typos.patch
d6dff30f61ebf57d2f8768f5e5f9721b4ff675ca1c9e3af99c96f9d79b06acf8aeb838a9b93d3b7eb6280c6af886809f0ef272ec5016fca75be00b755efc9c34  01-pingus-1.76-boost-1.69.patch
b872ad5f1ba988c2c29f1ac84dc8af72b891a57b657e3894158d020857876c8a5859b48dc18d126c0ddfc102183c77a1977b03f296bd5969ec8ff23b154d29d9  02-missing-header.patch
6b5ced7f03911694a219e42ca69953625cfe1f8059c788d5261640407286e90c7792c587df881656cce6730bf003de3ee12083c329c7520d0cebdf59ad797a0d  03-pingus-0.7.6-gcc470-udl.patch
6c2a8da1bcb250217c47d70ad223c02cf12879bab201433e76bf98f5693886ab0d96da295a795bfefe1723596011d41ff615c2262a277414234b88c8e35c64c8  pingus.desktop"
